import { Component, OnInit } from '@angular/core';
import { NzMessageService } from 'ng-zorro-antd/message';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.less']
})
export class AppComponent implements OnInit {
  title = 'dataCenter';
  constructor(private message: NzMessageService) {}

  ngOnInit(): void {
    console.log('appinital');
    this.createMessage('success');
  }

  createMessage(type: string): void {
    this.message.create(type, '欢迎来到Angular的世界');
  }

}
